﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CommunicationClass.Model
{
    public static class SendReceiveEnum
    {
        public enum SendOrReceiveTypeEnum
        {
            #region 消息类型
            未知=0,
            普通消息 = 21,
            登录 = 1,
            注销 = 2,
            注册 = 3,
            文件 = 4,
            语音=11,
            视频=13,
            语音消息=14,
            图片=15,
            短视频 =16,
            用户打洞=22,
            #endregion

            #region 响应类型
            普通消息答应 = 5,
            登录答应 = 6,
            注销答应 = 7,
            注册答应 = 8,
            文件答应 = 9,
            未登录=10,
            语音答应=12,
            视频答应=17,
            语音消息答应=18,
            图片答应 = 19,
            短视频答应 =20,
            #endregion
        }
        /// <summary>
        /// 获取对应关系传入消息类型转换响应类型，传递转换类型，返回消息类型
        /// </summary>
        /// <param name="sendOrReceiveType">消息类型</param>
        /// <returns></returns>
        public static SendOrReceiveTypeEnum GetCorresponding(SendOrReceiveTypeEnum sendOrReceiveType)
        {
            switch (sendOrReceiveType)
            {
                case   SendOrReceiveTypeEnum.图片:
                        return SendOrReceiveTypeEnum.图片答应;
                case SendOrReceiveTypeEnum.图片答应:
                    return SendOrReceiveTypeEnum.图片;
                case SendOrReceiveTypeEnum.文件:
                    return SendOrReceiveTypeEnum.文件答应;
                case SendOrReceiveTypeEnum.文件答应:
                    return SendOrReceiveTypeEnum.文件;
                case SendOrReceiveTypeEnum.普通消息:
                    return SendOrReceiveTypeEnum.普通消息答应;
                case SendOrReceiveTypeEnum.普通消息答应:
                    return SendOrReceiveTypeEnum.普通消息;
                case SendOrReceiveTypeEnum.注册:
                    return SendOrReceiveTypeEnum.注册答应;
                case SendOrReceiveTypeEnum.注册答应:
                    return SendOrReceiveTypeEnum.注册;
                case SendOrReceiveTypeEnum.注销:
                    return SendOrReceiveTypeEnum.注册答应;
                case SendOrReceiveTypeEnum.注销答应:
                    return SendOrReceiveTypeEnum.注销;
                case SendOrReceiveTypeEnum.登录:
                    return SendOrReceiveTypeEnum.登录答应;
                case SendOrReceiveTypeEnum.登录答应:
                    return SendOrReceiveTypeEnum.登录;
                case SendOrReceiveTypeEnum.短视频:
                    return SendOrReceiveTypeEnum.短视频答应;
                case SendOrReceiveTypeEnum.短视频答应:
                    return SendOrReceiveTypeEnum.短视频;
                case SendOrReceiveTypeEnum.视频:
                    return SendOrReceiveTypeEnum.视频答应;
                case SendOrReceiveTypeEnum.视频答应:
                    return SendOrReceiveTypeEnum.视频;
                case SendOrReceiveTypeEnum.语音:
                    return SendOrReceiveTypeEnum.语音答应;
                case SendOrReceiveTypeEnum.语音答应:
                    return SendOrReceiveTypeEnum.语音;
                case SendOrReceiveTypeEnum.语音消息:
                    return SendOrReceiveTypeEnum.语音消息答应;
                case SendOrReceiveTypeEnum.语音消息答应:
                    return SendOrReceiveTypeEnum.语音消息;
                default:
                    return SendOrReceiveTypeEnum.未知;
            }
        }


    }
}
